package threadLocal;


public class ThreadLocalTest {
    public static void main(String[] args) {
        new Thread(() -> {
            Message messageA = new Message();
            messageA.setNote("messageA");
            Util.set(messageA);
            new MessageConsumer().print();
        } , "Thread-A").start();

        new Thread(() -> {
            Message messageB = new Message();
            messageB.setNote("messageB");
            Util.set(messageB);
            new MessageConsumer().print();
        } , "Thread-B").start();
    }
}
